package com.greenleaf.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.greenleaf.dao.UserDao;
import com.greenleaf.entity.SearchCon;
import com.greenleaf.entity.User;
import com.greenleaf.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService {
	@Resource
private UserDao userDao;
	/**
	 * 查询所有管理员
	 */
	@Override
	public List<User> getAllUser(SearchCon searchCon) {
		return userDao.getAllUser(searchCon);
	}
	/**
	 * 查询所有管理员总数
	 */
	@Override
	public int getTotalUser(SearchCon searchCon) {
		return userDao.getTotalUser(searchCon);
	}
	@Override
	public int addUser(User user) {
		return userDao.addUser(user);
	}
	@Override
	public int updateUser(User user) {
		return userDao.updateUser(user);
	}
	@Override
	public int delUser(int userId) {
		return userDao.delUser(userId);
	}
	@Override
	public int delUsers(List<Integer> userIds) {
		return userDao.delUsers(userIds);
	}

}
